package rsj.common;

import java.util.HashMap;
import java.util.Map;

public enum CalculateEnum {

    /*按条计费1,包量计费2,按订阅量计费3,组合包量4*/

    BilByBar("按条计费", "1"),
    BilByStandard("包量计费", "2"),
    BilBySubscribe("按订阅量计费", "3"),
//    BilByCombination("组合包量", "4"),
    ;
    private static final Map<String, String> KVMap = new HashMap<>();

    private String desc;
    private String code;
    private CalculateEnum(String desc, String code){
        this.code = code;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    static {
        for(CalculateEnum key : CalculateEnum.values()){
            KVMap.put(key.getDesc(), key.getCode());
        }
    }

    public static Map<String, String> getKVMap() {
        return KVMap;
    }
}
